//HJ37
#include <stdio.h>

int main()
{
    int n=0;
   while( scanf("%d",&n)!=EOF)
   {
    scanf("%d",&n);
    int num1=1;
    int num2=1;
    int num=1;
    while(n>2)
    {
        num=num1+num2;
         num1=num2;
        num2=num;
        n--;
    }
    printf("%d\n",num);
   }
}
